<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>学习管理SOP表格系统汇总</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <script src="https://unpkg.com/lucide@latest"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js"></script>
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;700&family=Source+Han+Sans+CN:wght@300;400;700&display=swap" rel="stylesheet">
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#3B82F6',
                        secondary: '#10B981',
                        'highlight-bg': '#EFF6FF',
                        'highlight-text': '#1E40AF',
                    }
                }
            }
        }
    </script>
    <style>
        :root {
            --theme-primary: #3B82F6;
            --theme-secondary: #10B981;
            --highlight-bg: #EFF6FF;
            --highlight-text: #1E40AF;
        }
        body {
            font-family: 'Source Han Sans CN', sans-serif;
            font-weight: 300;
        }
        h1, h2, h3, blockquote {
            font-family: 'Noto Serif SC', serif;
        }
        .magazine-page {
            width: 700px;
            background: #fefefe;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            min-height: auto;
        }
        .dark .magazine-page {
            background: #111827;
        }
        .dark p {
            color: #d1d5db;
        }
        .dark h1, .dark h2, .dark h3 {
            color: #f9fafb;
        }
        .drop-cap::first-letter {
            float: left;
            font-size: 4em;
            line-height: 0.8;
            margin: 0.1em 0.1em 0 0;
            font-weight: 700;
            font-family: 'Noto Serif SC', serif;
        }
        .breathing-space {
            letter-spacing: 0.05em;
            line-height: 1.8;
        }
        .sop-table {
            border-collapse: collapse;
            width: 100%;
            margin-bottom: 1.5rem;
        }
        .sop-table th, .sop-table td {
            border: 1px solid #e5e7eb;
            padding: 0.75rem;
            text-align: left;
        }
        .sop-table th {
            background-color: #f9fafb;
            font-weight: 600;
        }
        .editable {
            min-height: 40px;
            padding: 0.5rem;
            border: 1px dashed #d1d5db;
            border-radius: 0.25rem;
        }
        .editable:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }
        .sop-card {
            background: white;
            border-radius: 0.5rem;
            box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
            padding: 1.5rem;
            margin-bottom: 1.5rem;
        }
        .sop-card h3 {
            color: #1e40af;
            border-bottom: 2px solid #e5e7eb;
            padding-bottom: 0.5rem;
            margin-bottom: 1rem;
        }
    </style>
</head>
<body class="bg-gray-100 dark:bg-gray-800 flex items-center justify-center min-h-screen p-4 md:p-8">
    <article class="magazine-page shadow-2xl p-8">
        <!-- 页面头部 -->
        <header class="mb-8">
            <h1 class="text-3xl font-bold leading-tight mb-2 relative">
                <span class="absolute left-0 -top-2 bottom-2 w-1.5 bg-primary rounded-full"></span>
                <span class="ml-6">学习管理SOP表格系统-汇总</span>
            </h1>
            <p class="text-lg text-gray-600 dark:text-gray-400 font-light ml-6">跟世界顶尖公司学习思考的方法！</p>
        </header>

        <!-- 导出按钮 -->
        <div class="flex justify-end mb-6 gap-3">
            <button id="export-pdf" class="bg-red-500 hover:bg-red-600 text-white font-medium py-2 px-4 rounded-lg transition duration-300 flex items-center">
                <i data-lucide="file-text" class="w-5 h-5 mr-2"></i>
                导出为PDF
            </button>
            <button id="export-doc" class="bg-blue-500 hover:bg-blue-600 text-white font-medium py-2 px-4 rounded-lg transition duration-300 flex items-center">
                <i data-lucide="download" class="w-5 h-5 mr-2"></i>
                导出为文档
            </button>
        </div>

        <!-- SOP表格内容 -->
        <div id="sop-content">
            <!-- 麦肯锡笔记法 -->
            <div class="sop-card">
                <h3 class="text-xl font-bold">麦肯锡笔记法</h3>
                <div class="mb-4">
                    <label class="block text-sm font-medium text-gray-700 mb-1">Topics主题</label>
                    <div class="editable" contenteditable="true">输入主题内容...</div>
                </div>
                <table class="sop-table">
                    <tr>
                        <th width="30%">Phenomenon 现象</th>
                        <th width="30%">Explanation 解释</th>
                        <th width="30%">Actions 行动</th>
                    </tr>
                    <tr>
                        <td><div class="editable" contenteditable="true">描述观察到的现象...</div></td>
                        <td><div class="editable" contenteditable="true">提供解释和分析...</div></td>
                        <td><div class="editable" contenteditable="true">列出行动计划...</div></td>
                    </tr>
                </table>
                <div class="mt-4">
                    <label class="block text-sm font-medium text-gray-700 mb-1">Conclusion 结论</label>
                    <div class="editable" contenteditable="true">总结核心结论...</div>
                </div>
            </div>

            <!-- 康奈尔笔记法 -->
            <div class="sop-card">
                <h3 class="text-xl font-bold">康奈尔笔记法</h3>
                <div class="mb-4">
                    <label class="block text-sm font-medium text-gray-700 mb-1">Topics主题</label>
                    <div class="editable" contenteditable="true">输入主题内容...</div>
                </div>
                <div class="grid grid-cols-3 gap-4">
                    <div>
                        <label class="block text-sm font-medium text-gray-700 mb-1">Organizing column 整理栏</label>
                        <div class="editable h-40" contenteditable="true">记录关键词、问题或提示...</div>
                    </div>
                    <div class="col-span-2">
                        <label class="block text-sm font-medium text-gray-700 mb-1">Notes column 笔记栏</label>
                        <div class="editable h-40" contenteditable="true">记录详细笔记内容...</div>
                    </div>
                </div>
                <div class="mt-4">
                    <label class="block text-sm font-medium text-gray-700 mb-1">Summary column 总结栏</label>
                    <div class="editable" contenteditable="true">总结核心观点和要点...</div>
                </div>
            </div>

            <!-- 丰田Excel笔记法 -->
            <div class="sop-card">
                <h3 class="text-xl font-bold">丰田Excel笔记法</h3>
                <div class="mb-4">
                    <label class="block text-sm font-medium text-gray-700 mb-1">Topics主题</label>
                    <div class="editable" contenteditable="true">输入主题内容...</div>
                </div>
                <div class="grid grid-cols-2 gap-4 mb-4">
                    <div>
                        <label class="block text-sm font-medium text-gray-700 mb-1">List of possible problems 罗列可能的问题</label>
                        <div class="editable h-40" contenteditable="true">1. 问题一<br>2. 问题二<br>3. 问题三</div>
                    </div>
                    <div>
                        <label class="block text-sm font-medium text-gray-700 mb-1">List of possible answers 罗列可能的答案</label>
                        <div class="editable h-40" contenteditable="true">1. 解决方案一<br>2. 解决方案二<br>3. 解决方案三</div>
                    </div>
                </div>
                <div>
                    <label class="block text-sm font-medium text-gray-700 mb-1">In a nutshell 一句话概括</label>
                    <div class="editable" contenteditable="true">用一句话总结核心内容...</div>
                </div>
            </div>

            <!-- 丰田A3笔记法 -->
            <div class="sop-card">
                <h3 class="text-xl font-bold">丰田A3笔记法</h3>
                <div class="mb-4">
                    <label class="block text-sm font-medium text-gray-700 mb-1">Topics主题</label>
                    <div class="editable" contenteditable="true">输入主题内容...</div>
                </div>
                <table class="sop-table">
                    <tr>
                        <th width="25%">Background 背景</th>
                        <td><div class="editable" contenteditable="true">描述问题背景...</div></td>
                    </tr>
                    <tr>
                        <th>Current Status 现状</th>
                        <td><div class="editable" contenteditable="true">描述当前状况...</div></td>
                    </tr>
                    <tr>
                        <th>Objectives 目标</th>
                        <td><div class="editable" contenteditable="true">设定明确目标...</div></td>
                    </tr>
                    <tr>
                        <th>Subjects 课题</th>
                        <td><div class="editable" contenteditable="true">识别关键课题...</div></td>
                    </tr>
                    <tr>
                        <th>Solutions 解决方案</th>
                        <td><div class="editable" contenteditable="true">提出解决方案...</div></td>
                    </tr>
                    <tr>
                        <th>Plan 计划</th>
                        <td><div class="editable" contenteditable="true">制定实施计划...</div></td>
                    </tr>
                </table>
            </div>

            <!-- 关键词阅读法 -->
            <div class="sop-card">
                <h3 class="text-xl font-bold">关键词阅读法</h3>
                <div class="space-y-4">
                    <div>
                        <label class="block text-sm font-medium text-gray-700 mb-1">1、Before Reading Ask a question 读书前提出问题</label>
                        <div class="editable" contenteditable="true">在阅读前提出要解决的问题...</div>
                    </div>
                    <div>
                        <label class="block text-sm font-medium text-gray-700 mb-1">2、Find out from the book 16 keywords 从书中找出16个关键词</label>
                        <div class="editable h-32" contenteditable="true">1. 关键词一<br>2. 关键词二<br>3. 关键词三<br>...<br>16. 关键词十六</div>
                    </div>
                    <div>
                        <label class="block text-sm font-medium text-gray-700 mb-1">3、Screened 3 views 筛选出3个观点</label>
                        <div class="editable h-24" contenteditable="true">1. 核心观点一<br>2. 核心观点二<br>3. 核心观点三</div>
                    </div>
                    <div>
                        <label class="block text-sm font-medium text-gray-700 mb-1">4、Summarize 1 course of action 归纳出1个行动方案</label>
                        <div class="editable" contenteditable="true">制定一个具体的行动方案...</div>
                    </div>
                </div>
            </div>

            <!-- 三分法阅读书单 -->
            <div class="sop-card">
                <h3 class="text-xl font-bold">三分法阅读书单</h3>
                <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
                    <div>
                        <label class="block text-sm font-medium text-gray-700 mb-1">Daily Reading List 每天阅读书单</label>
                        <div class="editable h-40" contenteditable="true">1. 书籍一<br>2. 书籍二<br>3. 书籍三</div>
                    </div>
                    <div>
                        <label class="block text-sm font-medium text-gray-700 mb-1">Reading list for necessary time occasions 必要时向场合阅读书单</label>
                        <div class="editable h-40" contenteditable="true">1. 书籍一<br>2. 书籍二<br>3. 书籍三</div>
                    </div>
                    <div>
                        <label class="block text-sm font-medium text-gray-700 mb-1">A list of books to read once is enough 读一次就够了的书单</label>
                        <div class="editable h-40" contenteditable="true">1. 书籍一<br>2. 书籍二<br>3. 书籍三</div>
                    </div>
                </div>
            </div>

            <!-- 学习复习表 -->
            <div class="sop-card">
                <h3 class="text-xl font-bold">学习复习表</h3>
                <div class="mb-4">
                    <label class="block text-sm font-medium text-gray-700 mb-1">Target/Date 目标/日期</label>
                    <div class="editable" contenteditable="true">设定学习目标和日期...</div>
                </div>
                <table class="sop-table">
                    <tr>
                        <th width="25%">First time 第一次</th>
                        <td><div class="editable" contenteditable="true">记录第一次学习的内容和心得...</div></td>
                    </tr>
                    <tr>
                        <th>Second time 第二次</th>
                        <td><div class="editable" contenteditable="true">记录第二次复习的内容和心得...</div></td>
                    </tr>
                    <tr>
                        <th>Third time 第三次</th>
                        <td><div class="editable" contenteditable="true">记录第三次复习的内容和心得...</div></td>
                    </tr>
                </table>
            </div>
        </div>

        <!-- 页面底部信息 -->
        <div class="flex items-center text-green-600 mt-8 pt-6 border-t border-gray-200 dark:border-gray-700">
            <i data-lucide="check-circle" class="w-5 h-5 mr-2"></i>
            <span>学习管理SOP表格系统 · 专业版</span>
        </div>
    </article>

    <script>
        // 初始化Lucide图标
        lucide.createIcons();

        // 导出为PDF功能
        document.getElementById('export-pdf').addEventListener('click', function() {
            const { jsPDF } = window.jspdf;
            
            // 获取要导出的内容
            const element = document.getElementById('sop-content');
            
            // 使用html2canvas将内容转换为图片
            html2canvas(element, {
                scale: 2, // 提高分辨率
                useCORS: true,
                logging: false
            }).then(canvas => {
                const imgData = canvas.toDataURL('image/png');
                const pdf = new jsPDF('p', 'mm', 'a4');
                const imgWidth = 210; // A4宽度
                const pageHeight = 295; // A4高度
                const imgHeight = canvas.height * imgWidth / canvas.width;
                let heightLeft = imgHeight;
                let position = 0;
                
                pdf.addImage(imgData, 'PNG', 0, position, imgWidth, imgHeight);
                heightLeft -= pageHeight;
                
                // 如果内容超过一页，添加新页面
                while (heightLeft >= 0) {
                    position = heightLeft - imgHeight;
                    pdf.addPage();
                    pdf.addImage(imgData, 'PNG', 0, position, imgWidth, imgHeight);
                    heightLeft -= pageHeight;
                }
                
                pdf.save('学习管理SOP表格.pdf');
            });
        });

        // 导出为文档功能
        document.getElementById('export-doc').addEventListener('click', function() {
            // 创建一个临时的div来保存格式化内容
            const tempDiv = document.createElement('div');
            tempDiv.innerHTML = document.getElementById('sop-content').innerHTML;
            
            // 获取所有可编辑区域的内容
            const editables = tempDiv.querySelectorAll('[contenteditable="true"]');
            editables.forEach(editable => {
                // 移除contenteditable属性
                editable.removeAttribute('contenteditable');
                // 添加样式以保持格式
                editable.style.border = 'none';
                editable.style.padding = '0';
                editable.style.minHeight = 'auto';
            });
            
            // 创建HTML内容
            const htmlContent = `
                <!DOCTYPE html>
                <html>
                <head>
                    <meta charset="UTF-8">
                    <title>学习管理SOP表格</title>
                    <style>
                        body { font-family: 'Source Han Sans CN', sans-serif; }
                        h1, h2, h3 { font-family: 'Noto Serif SC', serif; }
                        .sop-table { border-collapse: collapse; width: 100%; margin-bottom: 20px; }
                        .sop-table th, .sop-table td { border: 1px solid #ddd; padding: 8px; text-align: left; }
                        .sop-table th { background-color: #f2f2f2; }
                        .sop-card { margin-bottom: 30px; padding: 15px; border: 1px solid #ddd; border-radius: 5px; }
                    </style>
                </head>
                <body>
                    <h1>学习管理SOP表格</h1>
                    ${tempDiv.innerHTML}
                </body>
                </html>
            `;
            
            // 创建Blob并下载
            const blob = new Blob([htmlContent], { type: 'application/msword' });
            const url = URL.createObjectURL(blob);
            const a = document.createElement('a');
            a.href = url;
            a.download = '学习管理SOP表格.doc';
            document.body.appendChild(a);
            a.click();
            document.body.removeChild(a);
            URL.revokeObjectURL(url);
        });

        // 为所有可编辑区域添加提示
        document.querySelectorAll('.editable').forEach(editable => {
            editable.addEventListener('focus', function() {
                if (this.textContent === '输入主题内容...' || 
                    this.textContent === '描述观察到的现象...' ||
                    this.textContent === '提供解释和分析...' ||
                    this.textContent === '列出行动计划...' ||
                    this.textContent === '总结核心结论...' ||
                    this.textContent === '记录关键词、问题或提示...' ||
                    this.textContent === '记录详细笔记内容...' ||
                    this.textContent === '总结核心观点和要点...' ||
                    this.textContent === '1. 问题一<br>2. 问题二<br>3. 问题三' ||
                    this.textContent === '1. 解决方案一<br>2. 解决方案二<br>3. 解决方案三' ||
                    this.textContent === '用一句话总结核心内容...' ||
                    this.textContent === '描述问题背景...' ||
                    this.textContent === '描述当前状况...' ||
                    this.textContent === '设定明确目标...' ||
                    this.textContent === '识别关键课题...' ||
                    this.textContent === '提出解决方案...' ||
                    this.textContent === '制定实施计划...' ||
                    this.textContent === '在阅读前提出要解决的问题...' ||
                    this.textContent === '1. 关键词一<br>2. 关键词二<br>3. 关键词三<br>...<br>16. 关键词十六' ||
                    this.textContent === '1. 核心观点一<br>2. 核心观点二<br>3. 核心观点三' ||
                    this.textContent === '制定一个具体的行动方案...' ||
                    this.textContent === '1. 书籍一<br>2. 书籍二<br>3. 书籍三' ||
                    this.textContent === '设定学习目标和日期...' ||
                    this.textContent === '记录第一次学习的内容和心得...' ||
                    this.textContent === '记录第二次复习的内容和心得...' ||
                    this.textContent === '记录第三次复习的内容和心得...') {
                    this.textContent = '';
                }
            });
            
            editable.addEventListener('blur', function() {
                if (this.textContent.trim() === '') {
                    // 根据不同的元素设置不同的默认文本
                    if (this.closest('.sop-card').querySelector('h3').textContent === '麦肯锡笔记法') {
                        if (this.previousElementSibling.textContent.includes('Topics主题')) {
                            this.textContent = '输入主题内容...';
                        } else if (this.previousElementSibling.textContent.includes('Phenomenon')) {
                            this.textContent = '描述观察到的现象...';
                        } else if (this.previousElementSibling.textContent.includes('Explanation')) {
                            this.textContent = '提供解释和分析...';
                        } else if (this.previousElementSibling.textContent.includes('Actions')) {
                            this.textContent = '列出行动计划...';
                        } else if (this.previousElementSibling.textContent.includes('Conclusion')) {
                            this.textContent = '总结核心结论...';
                        }
                    }
                    // 其他情况的默认文本设置...
                }
            });
        });
    </script>
</body>
</html>